package com.example.java_chatroom1.server;

import com.example.java_chatroom1.mapper.UserMapper;
import com.example.java_chatroom1.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    UserMapper userMapper;

    public Integer registry(User user) {
        return userMapper.registry(user);
    }

    public User queryByName(String userName) {
        return userMapper.queryByName(userName);
    }
}
